/** ****************************************************************** *
 * @author Antoine David - Antoine.David@etu.enseeiht.fr
 * @version 1.0beta (not validated by the client)					   *
 * @date 2/3/11  													   *
 * @brief This file contains the provider for the IPSecRule. 		   *
 *																	   *
 * *********************************************************************
 * 
 * This provider is in charge of managing the consistency between 
 * IPSecRule (CIM-objects) and IPSec rules configurations.
 *
 * One interesting thing is that it supports standard CIM-operations, 
 * such as create_instance, enumerate_instance, etc.
 *
 * 
 * You'll find more on the technical report. 
 * 
 * 
 * */
#ifndef _IPSecRule_Provider_h
#define _IPSecRule_Provider_h

#include <cimple/cimple.h>
#include "IPSecRule.h"

CIMPLE_NAMESPACE_BEGIN

class IPSecRule_Provider
{
public:

    typedef IPSecRule Class;

    IPSecRule_Provider();

    ~IPSecRule_Provider();

    Load_Status load();

    Unload_Status unload();

    Get_Instance_Status get_instance(
        const IPSecRule* model,
        IPSecRule*& instance);

    Enum_Instances_Status enum_instances(
        const IPSecRule* model,
        Enum_Instances_Handler<IPSecRule>* handler);

    Create_Instance_Status create_instance(
        IPSecRule* instance);

    Delete_Instance_Status delete_instance(
        const IPSecRule* instance);

    Modify_Instance_Status modify_instance(
        const IPSecRule* model,
        const IPSecRule* instance);


    
    private:
	Array<IPSecRule*> _array;
    /*@END@*/
    
        int create_cmd(
    	const char* action,
    	IPSecRule* instance);

void debug(
    const char* level,
    const char* msg,
    IPSecRule* instance);

};

CIMPLE_NAMESPACE_END

#endif /* _IPSecRule_Provider_h */
